package com.yjht.modules.sys.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 
 * 
 * @author lengleng
 * @email wangiegie@gmail.com
 * @date 2018-06-14 11:37:32
 */
@TableName("sys_area")
public class SysAreaEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId
	private Long id;
	/**
	 * 父id
	 */
	private Long parentid;
	/**
	 * 区域名称
	 */
	private String areaname;
	/**
	 * 排序
	 */
	private Long sort;

	@TableField(exist=false)
	private List<SysAreaEntity> children = new ArrayList<>();

	/**
	 * 设置：主键
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * 获取：主键
	 */
	public Long getId() {
		return id;
	}
	/**
	 * 设置：父id
	 */
	public void setParentid(Long parentid) {
		this.parentid = parentid;
	}
	/**
	 * 获取：父id
	 */
	public Long getParentid() {
		return parentid;
	}
	/**
	 * 设置：区域名称
	 */
	public void setAreaname(String areaname) {
		this.areaname = areaname;
	}
	/**
	 * 获取：区域名称
	 */
	public String getAreaname() {
		return areaname;
	}
	/**
	 * 设置：排序
	 */
	public void setSort(Long sort) {
		this.sort = sort;
	}
	/**
	 * 获取：排序
	 */
	public Long getSort() {
		return sort;
	}

	public List<SysAreaEntity> getChildren() {
		return children;
	}

	public void addChildren(SysAreaEntity area) {
		this.children.add(area);
	}
}
